/*
 * UMLSynch RMI functionality test
 * http://umlsynch.googlecode.com
 *
 * Copyright 2008-2010, Evgeny Alexeyev
 * Licensed under the EPL - v1.0
 * http://www.eclipse.org/legal/epl-v10.html
 *
 */

package com.googlecode.umlsynch.rpc.test; 

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import com.googlecode.umlsynch.rpc.base.TConfig;

public class TRpcConfigDialog extends JFrame {

	TConfigPanel EclispeCfg = null;
	TConfigPanel VpsdeCfg;
	
	public static void main(String args[]) {
		new TRpcConfigDialog();
	}
	
	TRpcConfigDialog() {
		JPanel pane = new JPanel();
		//pane.setOpaque(true);
		pane.setLayout( new GridLayout(2,1));
		this.setContentPane(pane);
		
		//Create and set up Eclipse and VP content panes
        JTabbedPane tabbedPane = new JTabbedPane();
        EclispeCfg = new TConfigPanel();
        VpsdeCfg = new TConfigPanel();
        
        tabbedPane.setOpaque(true);
        tabbedPane.addTab("Eclipse", EclispeCfg);
        tabbedPane.addTab("Visual-Paradigm", VpsdeCfg);
        add(tabbedPane);
        JButton sl = new JButton("Start");
        sl.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				new TTestRpc(EclispeCfg.cfg, VpsdeCfg.cfg);
			}});
        add(sl);
        pack();
		setVisible(true);
	}
}